﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace XNA_Game_Framework
{
	public static class TextTools
	{
		public static int Height(string text, SpriteFont font)
		{
			return (int)font.MeasureString(text).Y;
		}

		public static bool IsChar(string text)
		{
			Char charVal;
			return Char.TryParse(text, out charVal);
		}

		public static Vector2 Size(string text, SpriteFont font)
		{
			return font.MeasureString(text);
		}

		public static int Width(string text, SpriteFont font)
		{
			return (int)font.MeasureString(text).X;
		}
	}
}
